{% import 'include/macros/datatable.html' as datatable %}
<table class="datatable border" style="min-width: 1100px; max-width: 1800px">
	<tr class="head">
		<td width="20">
			<img src="images/icons/loader-table.gif" class="loader-table"/>
			<input type="checkbox" class="all-select-unselect"/>
		</td>
		<td>Mot</td>
		<td>Prononciation</td>
		<td>Catégorie</td>
		<td>Titre</td>
		<td>Traduction</td>
		<td></td>
	</tr>
	{% for translation in translations %}
	<tr class="{{ cycle(['odd', 'even'], loop.index%2) }}">
		<td>
			{% if delete %}
			<input type="checkbox" name="ids_translation_to_delete[]" value="{{ translation.id_translation }}"/>
			{% else %}
			<input type="checkbox" name="ids_translation_to_add[]" value="{{ translation.id_translation }}"/>
			{% endif %}
		</td>
		<td>
			{{ translation.term.kana }}
			{% if translation.term.isToneDistinct() %}
			( {{ translation.term.getToneHTML()|raw }} )
			{% endif %}
		</td>
		<td>{{ translation.term.pronunciation_romaji }}</td>
		<td>{{ translation.category }}</td>
		<td>{{ translation.title }}</td>
		<td>{{ translation.translation|nl2br }}</td>
		{% if delete %}
		<td class="icon">{{ datatable.delete("ajax/translation.list.item.delete.ajax.php?id_translation=#{translation.id_translation}&id_list=#{id_list}", {class: 'delete_translation_list'}) }}</td>
		{% elseif add %}
		<td class="icon">{{ datatable.add("ajax/translation.list.item.add.ajax.php?id_translation=#{translation.id_translation}&id_list=#{id_list}", {class: 'add_translation_list'}) }}</td>
		{% endif %}
	</tr>
	{% else %}
	<tr class="odd">
		<td colspan="8">Aucun mot trouvé.</td>
	</tr>
	{% endfor %}
</table>